// sql语句
//sqlMap.js——SQL 语句映射文件，供 API 调用
var sqlMap = {
	user: {
		add: 'insert into user(username,password) values (?,?)',
		login: 'SELECT * FROM user WHERE username = ? AND password = ?',
		checkScore: 'SELECT * FROM rank WHERE uid = ?',
		updateScore: 'UPDATE rank SET score = ?, card = ?,cost = ?,gametime = ? WHERE uid = ?',
		totalScore: 'insert into rank(uid,score,card,cost,gametime) values (?,?,?,?,?)',
		getRank: 'SELECT user.username, rank.score,rank.card,rank.cost,rank.gametime FROM user INNER JOIN rank ON user.uid = rank.uid ORDER BY rank.score DESC'
	}
}
module.exports = sqlMap